package com.example.design.shejimoshi.structure.adapter.统一多个类的接口设计;

import com.example.design.shejimoshi.structure.adapter.统一多个类的接口设计.外部资源.WeChatPay;

public class weChatPayAdapter implements Pay {
    /**
     * 微信支付
     */
    private WeChatPay weChatPay;

    public weChatPayAdapter(WeChatPay weChatPay) {
        this.weChatPay = weChatPay;
    }  

    @Override  
    public String pay(double amount, String paymentDetails) {  
        // 假设ServiceB不需要支付详情，我们只需要传递金额  
        return weChatPay.weChatPay(amount);
    }  
}